package cn.yuysaln.domain.strategy.service.armory;

import java.util.Date;

public interface IStrategyDispatch {

    /**
     * 模拟无规则抽奖
     * @param strategyId 具体某一个策略Id
     * @return 该策略下奖品的Id
     */
    Integer getRandomAwardId(Long strategyId);

    /**
     * 模拟有规则抽奖
     * @param strategyId 具体转盘策略Id
     * @param ruleWeightValue  可以解锁的范围，格式形如：4000:102,103,104,105
     * @return 奖品Id
     */
    Integer getRandomAwardId(Long strategyId,String ruleWeightValue);


    /**
     * 根据策略ID和奖品ID，扣减奖品缓存库存
     *
     * @param strategyId 策略ID
     * @param awardId    奖品ID
     * @return 扣减结果
     */
    Boolean subtractionAwardStock(Long strategyId, Integer awardId, Date endDateTime);


}
